<div class="container">
    <div class="row">
         <div class="col-sm-10">
            <h3>
            Oferty ROR
            <a class="pull-right btn btn-primary btn-sm" href="<?php echo Yii::app()->createUrl('admin/createaccountkind', array())?>" >
               Dodaj ofertę
            </a>
            </h3>
        </div>
        <div class="col-sm-10">
        <?php
        $this->widget('zii.widgets.grid.CGridView', array(
            'dataProvider' => new CArrayDataProvider($accounts),
            'columns' => array(
                array(
                    'name' => 'ID',
                    'header' => '#',
                    'value' => 'CHtml::encode($data["id"])',
                    'htmlOptions' => array('style' => 'width: 50px; text-align: center;', 'class' => 'zzz'),
                ),
                array(
                    'name' => 'Name',
                    'header' => 'Nazwa',
                    'type' => 'raw',
                    'value' => 'CHtml::encode($data["nazwa"])',
                    'htmlOptions' => array( 'style' => 'width: 100px; text-align: center;', 'class' => 'zzz'),
                ),
                array(
                    'name' => 'Aktywny',
                    'header' => 'Oferta',
                    'type' => 'raw',
                    'value' => 'CHtml::encode($data["aktywny"]==1?"Aktywna":"Nie aktywna")',
                    'htmlOptions' => array( 'style' => 'width: 50px; text-align: center;', 'class' => 'zzz'),
                ),
                array(
                    'class' => 'CButtonColumn',
                    'template' => '{update}',
                    'buttons' => array(
                        'update' => array(
                            'label' => '<i class="fa fa-folder fa-fw"></i> Szczegóły',
                            'url' => 'Yii::app()->createUrl("home/index", array())',
                            'imageUrl' => false,
                            'htmlOptions' => array('target' => '_blank', 'title' => 'Szczegóły'),
                        ),
                    ),
                ),
                array(
                    'class' => 'CButtonColumn',
                    'template' => '{update}',
                    'buttons' => array(
                        'update' => array(
                            'label' => '<i class="fa fa-pencil fa-fw"></i>',
                            'url' => 'Yii::app()->createUrl("admin/editaccountkind", array("id"=>$data["id"]))',
                            'imageUrl' => false,
                        ),
                    ),
                ),
            )
        ));
        ?>
        </div>
    </div>
</div>

